﻿using log4net;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace RabbitMQDemo.Models.demo2
{
    public class ChapterTwoLister : RabbitListener
    {
        private ILog log;

        public ChapterTwoLister(IOptions<RabbitMQSetting> options,
         ILogger<RabbitListener> logger) : base(options)
        {
            base.RouteKey = "done.tasks";
            base.QueueName = "lemonnovelapi.chapters";
            this.log = LogManager.GetLogger(Startup.repository.Name, typeof(ChapterLister));
        }

        public override bool Process(string message)
        {
            log.Info("ChapterTwoLister-process:" + message);
            return true;
        }
    }
}
